import wx from 'weixin-webview-jssdk'
import { setThemeColor } from '@/utils/setThemeColor'
import { wxConfigApi } from '@/api/wx'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import 'normalize.css'
import './styles/index.less'
import Vconsole from 'vconsole'

if (['dev', 'test', 'pre'].includes(BUILD_ENV)) {
    new Vconsole()
}

dayjs.locale('zh-cn')

setThemeColor({ primaryColor: '#4B72FD' })

wxConfigApi(location.href).then(res => {
    console.log(res.data)

    wx.config(res.data)
})
